package com.share51.novel.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import lombok.*;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author gb
 * @since 2020-03-23
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@ToString
@TableName("t_novel")
public class Novel extends Model<Novel> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * 修改时间
     */
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    /**
     * 创建人
     */
    @TableField("create_user")
    private Integer createUser;
    /**
     * 修改人
     */
    @TableField("update_user")
    private Integer updateUser;
    /**
     * 状态
     */
    private Integer status;
    /**
     * 名称
     */
    private String name;
    /**
     * 关键字
     */
    private String keywords;
    /**
     * 描述
     */
    private String summary;
    /**
     * 摘要
     */
    private String introduce;
    /**
     * 分类
     */
    private Integer category;
    /**
     * 作者
     */
    private String author;
    /**
     * 封面
     */
    private String icon;
    /**
     * 总字数
     */
    private Integer number;
    /**
     * 最新更新
     */
    @TableField("last_chapter")
    private String lastChapter;
    /**
     * 连载状态
     */
    @TableField("series_status")
    private Integer seriesStatus;

    @TableField(exist = false)
    private List<Chapter> chapterList;

    @TableField(exist = false)
    private int site;

    @TableField(exist = false)
    private String url;

    @TableField(exist = false)
    private Integer orderIndex;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
